package org.timeticker;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;

/**
 * Activity interface.
 * Sefines activity content
 *
 * @author Ivan Latysh
 * @version 0.1
 * @since 11-Jul-2007 : 9:43:04 PM
 */
public interface Activity extends Serializable {

  /**
   * Return activity date
   *
   * @return date
   */
  public Day getDay();

  /**
   * Set activity date
   *
   * @param date date
   */
  public void setDay(Day date);

  /**
   * Return activity title that will be displayed on the list
   *
   * @return activity title
   */
  public String getTitle();

  /**
   * Set activity title
   *
   * @param title title to set
   */
  public void setTitle(String title);

  /**
   * Return work type code
   *
   * @return work type code
   */
  public String getWorkTypeCode();

  /**
   * Set work type code
   *
   * @param workTypeCode work type code
   */
  public void setWorkTypeCode(String workTypeCode);

  /**
   * Return project code
   *
   * @return project code
   */
  public String getProjectCode();

  /**
   * Set project code
   *
   * @param projectCode project code
   */
  public void setProjectCode(String projectCode);

  /**
   * Return activity start time
   *
   * @return start time
   */
  public Date getStartTime();

  /**
   * Set activity start time.

   * @param time activity start time
   * @see #start()
   */
  public void setStartTime(Date time);

  /**
   * Return activity finish time
   *
   * @return finish time
   */
  public Date getFinishTime();

  /**
   * Set activity finish time
   *
   * @param time activity finish time
   * @see #stop()
   */
  public void setFinishTime(Date time);

  /**
   * Return activity duration
   *
   * @return activity duration.
   */
  public long getDuration();

  /**
   * Start activity
   */
  public void start();

  /**
   * Stop activity
   */
  public void stop();

  /**
   * Return comments
   *
   * @return comments
   */
  public String getComments();

  /**
   * Set comments
   *
   * @param comments comments to set
   */
  public void setComments(String comments);

  /**
   * Return custom fields
   *
   * @return custom fields map
   */
  public Map<String, ? extends Serializable> getCustomFields(); 

  /**
   * Return activity parameter map.
   *
   * @return parameter map
   */
  public Map<String, ? extends Serializable> getParameters();

}
